<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>商城商城商品列表</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../../css/app.css" />
		<style type="text/css">
			.aui-bar-nav {
				background-color: #005A93;
				color: #fff;
			}

			.aui-bar-nav .aui-pull-left.btn-back {
				padding: 0;
				padding-left: 0.75rem;
			}

			.aui-bar-nav .aui-pull-left.btn-search {
				/*margin-left: 0.5rem;*/
				margin-right: 0.5rem;
				height: 1.7rem;
				line-height: 1.7rem;
				background-color: #F5F5F5;
				border-radius: 0.9rem;
				margin-top: 0.275rem;
				width: calc(100vw - 2.5rem);
				width: -webkit-calc(100vw - 2.5rem);
			}

			.aui-tab-item {
				height: 2.5rem;
				line-height: 2.5rem;
				font-size:.75rem;
				font-family:PingFangSC-Regular;
				font-weight:400;
				color:rgba(34,34,34,1);
			}

			.aui-tab-item.aui-text-linear {
				font-weight: bolder;
				/*color:rgba(114,213,239,1);*/
			}
			.text-linear span{
				display: inline-block;
				height: 100%;
				/*color: #72D5EF;  颜色改不了*/
				font-size:.75rem;
				font-family:PingFangSC-Medium;
				font-weight:500;
				color:#005A93!important;
				padding: 0 .2rem;
				border-bottom: .1rem solid #005A93;
				/* background:rgba(239,249,255,0.4); */
			}
		</style>
	</head>

	<body>
		<div id="app" v-cloak>
			<div class="ming-bg-blue" id="aui-header">
				<header class="aui-bar aui-bar-nav ming-bg-whit">
					<a class="aui-pull-left btn-back" tapmode onclick="close_win()">
						<img class="btn-img-back" src="../../image/btn/btn-back.png" />
					</a>
					<div class="aui-pull-left btn-search" tapmode onclick="openWin_Search()">
						<img style="width:0.65rem;height:0.7rem;display: inline-block;margin-left:0.5rem;margin-right:0.25rem" src="../../image/btn/btn-search-new.svg" />
						<span style="font-size: .65rem;color: #BBBBBB;font-family:PingFangSC-Regular;font-weight:400;">搜索商品</span>
					</div>
				</header>

				<div class="aui-tab aui-border-b">
					<!-- <div class="aui-tab-item" :class="{'text-linear':index=='all'}" :style="{'color:#005A93':index=='all'}" tapmode onclick="tapindex('all')">
						<span>全部商品</span>
					</div> -->

					<div class="aui-tab-item" :class="{'text-linear':index==sign1}" tapmode @click="tapindex(sign1)">
						<span>{{sign1}}</span>
					</div>
					<div class="aui-tab-item" :class="{'text-linear':index==sign2}" tapmode @click="tapindex(sign2)">
						<span>{{sign2}}</span>
					</div>
					<div class="aui-tab-item" :class="{'text-linear':index==sign3}" tapmode @click="tapindex(sign3)">
						<span>{{sign3}}</span>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/vue.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script>
		var vm = new Vue({
			el: '#app',
			data: {
				index: 'all',
				good_sign:[],
				sign1:'',
				sign2:'',
				sign3:''
			},
			methods: {
				get_sign: function() {
					get_data('api/good/goodsign', {
					}, function(ret) {
						// alert(2)
						// alert(JSON.stringify(ret))
						if(ret.status) {
							vm.good_sign = ret.data
							vm.sign1 = vm.good_sign[0].sign_name;
							vm.sign2 = vm.good_sign[1].sign_name;
							vm.sign3 = vm.good_sign[2].sign_name;
							// console.log(vm.good_sign[0])
						}
						// console.log(vm.good_sign)
					})
				},
			}
		})
		apiready = function() {
			// alert(1)
			vm.get_sign();
			$api.fixStatusBar($api.byId('aui-header'))
			vm.index = $api.getStorage('sign');
			var coupon = api.pageParam.coupon;
			open_frame('goods_list_type_f', 'goods_list_type_f.html', 'aui-header', false,{coupon:coupon})
		};



		function tapindex(index) {
			if(vm.index != index) {
				vm.index = index
				send_event('goods_sign',{
					sign:index
				})
			}
		}
	</script>

</html>
